﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.IdentityModel.Selectors;
using System.Linq;
using System.ServiceModel;
using System.Web;

namespace Onshi.POS.AccesoDatos
{
    public class Autentificacion : UserNamePasswordValidator
    {
        public override void Validate(string userName, string password)
        {
            if (userName == null || password == null)
                throw new FaultException("TU VIEJA");
                //throw new ArgumentNullException();

            if (!(userName == ConfigurationManager.AppSettings["usuario"] && password == ConfigurationManager.AppSettings["Clave"]))
                throw new FaultException("Usuario o contraseña incorrecta");
        }
    }
}